Currently, UE connecting to a Wi-Fi hotspot device and using the Wi-Fi hotspot device to connect to the Internet is a very mature technology. When a user uses UE to connect to a Wi-Fi hotspot device, the user needs to select a specific Wi-Fi hotspot device from hotspot devices that are currently found by the UE, and then inputs corresponding authentication information, such as an authentication mode or an authentication password, into the UE, and the UE can connect to the Wi-Fi hotspot device only after being authenticated using the corresponding authentication information. In such a connection manner, a user needs to perform some operations, which brings inconvenience and degrades user experience.